package me.CSmethod.demo.lianxi;

import java.util.Scanner;

public class Text1 {
    public static void main(String[] args) {
        int a[] = {1, 2, 3, 4, 5};
        print(a);
    }

    public static void print(int a[]) {
        System.out.print("[");
        for (int i = 0; i < a.length; i++) {
            if (i == a.length - 1) {
                System.out.print(a[i]);
            } else {
                System.out.print(a[i] + ",");
            }

        }
        System.out.println("]");
    }
}
